import os
import yaml


# 加载配置文件，日志配置文件
def load_yaml():
    current_path = os.path.abspath(__file__)
    father_path = os.path.abspath(os.path.dirname(current_path))
    conf_path = os.path.join(father_path, "conf.yml")
    with open(conf_path, "r", encoding='utf-8') as f:
        # FullLoader加载完整的YAML,避免任意代码执行
        all_config = yaml.load(f, Loader=yaml.FullLoader)
    return all_config


conf = load_yaml()
